import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [{
        path: '/',
        redirect: '/AudioMenage'
    },
    {
        path: '/',
        component: () => import( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
        meta: {
            title: '自述文件'
        },
        children: [{
            name: 'AudioMenage',
            path: '/AudioMenage',
            component: () => import('../components/page/AudioMenage/index.vue'),
            meta: {
                title: '小说管理'
            }
        }, {
            name: 'EBookMenage',
            path: '/EBookMenage',
            component: () => import('../components/page/EBookMenage/index.vue'),
            meta: {
                title: '审核列表'
            }
        },
        {
            path: '/borrowBooks',
            name: 'borrowBooks',
            component: () => import( /* webpackChunkName: "editor" */ '../components/page/borrowBooks.vue'),
            meta: {
                title: '章节详情'
            }
        }
        ]
    },
    {
        path: '/login',
        component: () => import( /* webpackChunkName: "login" */ '../components/page/Login.vue'),
        meta: {
            title: '登录'
        }
    },
    {
        path: '*',
        redirect: '/404'
    }
    ]
});